All Questions
Tagged with lazy-initializationphp
2 questions
21votes
6answers
18kviews
DDD Injecting Services on Entity Methods Calls
Short format of question Is it within best practices of DDD and OOP to inject services on entity method calls? Long format example Let's say we have the classic Order-LineItems case in DDD, where ...
1vote
1answer
439views
What are the benefits of using lazy initialization when i.e. calling Doctrine's EntityManager?
TL;DR: I have noted that some tutorials are using an extra method call to retrieve a variable, in my case EntityManager of Doctrine. Is it generally a good idea to use such extra method call, when it ...